#include "skybox.h"

void Sphere01(const RGBImage *img)
{
	const static GLfloat VertexData[] = {
		0.000000f, 61.0000f, 7.62939e-006f, 58.1103f, -19.5000f, 7.56582e-006f, 50.3250f, -19.5000f, 29.0552f, 
		29.0552f, -19.5000f, 50.3250f, -3.17891e-008f, -19.5000f, 58.1103f, 
		-29.0552f, -19.5000f, 50.3250f, -50.3250f, -19.5000f, 29.0552f, 
		-58.1103f, -19.5000f, 7.56582e-006f, -50.3250f, -19.5000f, -29.0551f, 
		-29.0552f, -19.5000f, -50.3250f, -3.17891e-008f, -19.5000f, -58.1103f, 
		29.0552f, -19.5000f, -50.3250f, 50.3250f, -19.5000f, -29.0551f, 
		61.0000f, 3.81470e-006f, 7.62939e-006f, 52.8275f, 3.81470e-006f, 30.5000f, 
		30.5000f, 3.81470e-006f, 52.8276f, 3.73517e-015f, 3.81470e-006f, 61.0000f, 
		-30.5000f, 3.81470e-006f, 52.8276f, -52.8275f, 3.81470e-006f, 30.5000f, 
		-61.0000f, 3.81470e-006f, 7.62939e-006f, -52.8275f, 3.81470e-006f, -30.5000f, 
		-30.5000f, 3.81470e-006f, -52.8275f, -1.12055e-014f, 3.81470e-006f, -61.0000f, 
		30.5000f, 3.81470e-006f, -52.8275f, 52.8275f, 3.81470e-006f, -30.5000f, 
		52.8275f, 30.5000f, 7.62939e-006f, 45.7500f, 30.5000f, 26.4138f, 
		26.4138f, 30.5000f, 45.7500f, 3.23475e-015f, 30.5000f, 52.8276f, 
		-26.4138f, 30.5000f, 45.7500f, -45.7500f, 30.5000f, 26.4138f, 
		-52.8275f, 30.5000f, 7.62939e-006f, -45.7500f, 30.5000f, -26.4138f, 
		-26.4138f, 30.5000f, -45.7500f, -9.70426e-015f, 30.5000f, -52.8275f, 
		26.4138f, 30.5000f, -45.7500f, 45.7500f, 30.5000f, -26.4138f, 
		30.5000f, 52.8275f, 7.62939e-006f, 26.4138f, 52.8275f, 15.2500f, 
		15.2500f, 52.8275f, 26.4138f, 1.86759e-015f, 52.8275f, 30.5000f, 
		-15.2500f, 52.8275f, 26.4138f, -26.4138f, 52.8275f, 15.2500f, 
		-30.5000f, 52.8275f, 7.62939e-006f, -26.4138f, 52.8275f, -15.2500f, 
		-15.2500f, 52.8275f, -26.4138f, -5.60276e-015f, 52.8275f, -30.5000f, 
		15.2500f, 52.8275f, -26.4138f, 26.4138f, 52.8275f, -15.2500f
	};
	const static GLfloat NormalData[] = {
		0.000000f, -1.00000f, 1.28866e-009f, -0.989198f, 0.146588f, 0.000000f, -0.856670f, 0.146589f, -0.494599f, 
		-0.494599f, 0.146589f, -0.856670f, -7.70786e-009f, 0.146589f, -0.989198f, 
		0.494599f, 0.146589f, -0.856670f, 0.856670f, 0.146589f, -0.494599f, 
		0.989198f, 0.146588f, 0.000000f, 0.856670f, 0.146589f, 0.494599f, 
		0.494599f, 0.146589f, 0.856670f, 7.70785e-009f, 0.146589f, 0.989197f, 
		-0.494599f, 0.146589f, 0.856670f, -0.856670f, 0.146589f, 0.494599f, 
		-0.998347f, -0.0574672f, 0.000000f, -0.864594f, -0.0574672f, -0.499174f, 
		-0.499174f, -0.0574672f, -0.864594f, 0.000000f, -0.0574672f, -0.998347f, 
		0.499174f, -0.0574672f, -0.864594f, 0.864594f, -0.0574672f, -0.499174f, 
		0.998347f, -0.0574672f, 0.000000f, 0.864594f, -0.0574671f, 0.499174f, 
		0.499174f, -0.0574671f, 0.864594f, 0.000000f, -0.0574671f, 0.998347f, 
		-0.499174f, -0.0574671f, 0.864594f, -0.864594f, -0.0574671f, 0.499174f, 
		-0.865033f, -0.501714f, 0.000000f, -0.749141f, -0.501714f, -0.432517f, 
		-0.432517f, -0.501714f, -0.749141f, 5.93149e-009f, -0.501714f, -0.865033f, 
		0.432517f, -0.501714f, -0.749141f, 0.749141f, -0.501714f, -0.432517f, 
		0.865033f, -0.501714f, 0.000000f, 0.749141f, -0.501714f, 0.432517f, 
		0.432517f, -0.501714f, 0.749141f, -3.95433e-009f, -0.501715f, 0.865033f, 
		-0.432517f, -0.501714f, 0.749141f, -0.749141f, -0.501714f, 0.432517f, 
		-0.573584f, -0.819147f, 2.59365e-009f, -0.431481f, -0.867044f, -0.249116f, 
		-0.286792f, -0.819147f, -0.496738f, 0.000000f, -0.867044f, -0.498231f, 
		0.286792f, -0.819147f, -0.496738f, 0.431481f, -0.867044f, -0.249116f, 
		0.573584f, -0.819147f, 2.59365e-009f, 0.431481f, -0.867044f, 0.249116f, 
		0.286792f, -0.819147f, 0.496738f, 0.000000f, -0.867044f, 0.498231f, 
		-0.286792f, -0.819147f, 0.496738f, -0.431481f, -0.867044f, 0.249116f
	};
	const static GLfloat TexCoordData[] = {
		0.500000f, 1.00000f, 0.500000f, -0.000000f, 0.738157f, -0.000000f, 
		0.912500f, -0.000000f, 0.976314f, -0.000000f, 
		0.912500f, -0.000000f, 0.738157f, -0.000000f, 
		0.500000f, -0.000000f, 0.261843f, -0.000000f, 
		0.0875001f, -0.000000f, 0.0236860f, -0.000000f, 
		0.0875001f, -0.000000f, 0.261843f, -0.000000f, 
		0.500000f, 0.242236f, 0.750000f, 0.242236f, 
		0.933013f, 0.242236f, 1.00000f, 0.242236f, 
		0.933013f, 0.242236f, 0.750000f, 0.242236f, 
		0.500000f, 0.242236f, 0.250000f, 0.242236f, 
		0.0669873f, 0.242236f, 0.000000f, 0.242236f, 
		0.0669873f, 0.242236f, 0.250000f, 0.242236f, 
		0.500000f, 0.621118f, 0.716506f, 0.621118f, 
		0.875000f, 0.621118f, 0.933013f, 0.621118f, 
		0.875000f, 0.621118f, 0.716506f, 0.621118f, 
		0.500000f, 0.621118f, 0.283494f, 0.621118f, 
		0.125000f, 0.621118f, 0.0669873f, 0.621118f, 
		0.125000f, 0.621118f, 0.283494f, 0.621118f, 
		0.500000f, 0.898479f, 0.625000f, 0.898479f, 
		0.716506f, 0.898479f, 0.750000f, 0.898479f, 
		0.716506f, 0.898479f, 0.625000f, 0.898479f, 
		0.500000f, 0.898479f, 0.375000f, 0.898479f, 
		0.283494f, 0.898479f, 0.250000f, 0.898479f, 
		0.283494f, 0.898479f, 0.375000f, 0.898479f
	};
	const static GLint Indices[] = {
		37, 38, 0, 38, 39, 0, 39, 40, 0, 40, 41, 0, 41, 42, 0, 42, 
		43, 0, 43, 44, 0, 44, 45, 0, 45, 46, 0, 46, 47, 0, 47, 48, 
		0, 48, 37, 0, 2, 13, 1, 2, 14, 13, 15, 14, 2, 3, 15, 2, 
		4, 15, 3, 4, 16, 15, 17, 16, 4, 5, 17, 4, 6, 17, 5, 6, 
		18, 17, 19, 18, 6, 7, 19, 6, 8, 19, 7, 8, 20, 19, 21, 20, 
		8, 9, 21, 8, 10, 21, 9, 10, 22, 21, 23, 22, 10, 11, 23, 10, 
		12, 23, 11, 12, 24, 23, 13, 24, 12, 1, 13, 12, 26, 25, 13, 14, 
		26, 13, 15, 26, 14, 15, 27, 26, 28, 27, 15, 16, 28, 15, 17, 28, 
		16, 17, 29, 28, 30, 29, 17, 18, 30, 17, 19, 30, 18, 19, 31, 30, 
		32, 31, 19, 20, 32, 19, 21, 32, 20, 21, 33, 32, 34, 33, 21, 22, 
		34, 21, 23, 34, 22, 23, 35, 34, 36, 35, 23, 24, 36, 23, 13, 36, 
		24, 13, 25, 36, 26, 37, 25, 26, 38, 37, 39, 38, 26, 27, 39, 26, 
		28, 39, 27, 28, 40, 39, 41, 40, 28, 29, 41, 28, 30, 41, 29, 30, 
		42, 41, 43, 42, 30, 31, 43, 30, 32, 43, 31, 32, 44, 43, 45, 44, 
		32, 33, 45, 32, 34, 45, 33, 34, 46, 45, 47, 46, 34, 35, 47, 34, 
		36, 47, 35, 36, 48, 47, 37, 48, 36, 25, 37, 36
	};

	glEnableClientState(GL_TEXTURE_COORD_ARRAY);
	glTexCoordPointer(2, GL_FLOAT, 0, TexCoordData);
	glEnableClientState(GL_NORMAL_ARRAY);
	glNormalPointer(GL_FLOAT, 0, NormalData);
	glEnableClientState(GL_VERTEX_ARRAY);
	glVertexPointer(3, GL_FLOAT, 0, VertexData);


	// Material attributes for surface 'sky.sgi'
	OGL_Set_Current_Material_Parameters(32.0000f, 1.00000f, 1.00000f, 1.00000f, 1.00000f, 1.00000f, 1.00000f);

	
	OGL_Set_Current_Texture_Map(img, 1.00000f, 1.00000f, 0.000000f, 0.000000f);

	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[0]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[3]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[6]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[9]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[12]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[15]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[18]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[21]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[24]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[27]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[30]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[33]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[36]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[39]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[42]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[45]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[48]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[51]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[54]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[57]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[60]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[63]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[66]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[69]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[72]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[75]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[78]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[81]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[84]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[87]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[90]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[93]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[96]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[99]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[102]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[105]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[108]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[111]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[114]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[117]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[120]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[123]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[126]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[129]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[132]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[135]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[138]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[141]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[144]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[147]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[150]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[153]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[156]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[159]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[162]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[165]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[168]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[171]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[174]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[177]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[180]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[183]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[186]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[189]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[192]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[195]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[198]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[201]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[204]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[207]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[210]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[213]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[216]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[219]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[222]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[225]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[228]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[231]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[234]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[237]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[240]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[243]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[246]);
	glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_INT, &Indices[249]);
}	// End of polygons for object 'Sphere01'

void zeichneSkyboxTag() 
{
  Sphere01(sky_tag);
}

void zeichneSkyboxNacht()
{
  Sphere01(sky_nacht);
  
}
